﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomeMain.master" AutoEventWireup="true" CodeFile="ChiTietTinTuc.aspx.cs" Inherits="ChiTietTinTuc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
         <ItemTemplate>
    <div class="row">
        <div class="col-md-8 tintuc">
            <h1>
                <asp:Label ID="TieuDe" runat="server" Text='<%# Eval("Tieude") %>'></asp:Label>
                </h1>
            <hr />
            <p>
                <span class="glyphicon glyphicon-user"></span>
                <asp:Label ID="NguoiDang" runat="server" Text='<%# Eval("NguoiTao","Người Đăng : {0}") %>'></asp:Label>
    
            </p>
            <p class="new-decs">             
                <asp:Label ID="MieuTa" runat="server" Text='<%# Eval("Tomtat") %>'></asp:Label>
            </p>
            <asp:Image ID="HinhAnh" runat="server"  ImageUrl='<%# "~/"+Eval("Hinhanh") %>'/>

            <p>
                <asp:Label ID="NoiDung" runat="server" Text='<%# Eval("Noidung") %>'></asp:Label>
            </p>
            <hr />

<%--            <div class="well">
                <h3>MỜI BẠN BÌNH LUẬN HOẶC ĐẶT CÂU HỎI VỀ CHỦ ĐỀ NÀY</h3>
                <form role="form">
                    <div class="form-group">
                        <textarea class="form-control" rows="3"></textarea>
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
            </div>--%>
            <hr />
          <%--  <div class="news-cmt">
                <h3>Có 3 bình luận :</h3>
                <div class="media">
                                        <a href="#" class="pull-left">
                        <asp:Image ID="HinhDaiDien" CssClass="media-object" runat="server" Height="64px" Width="64px" ImageUrl="~/Images/avat.png"/>      
                    </a>
                    <div class="media-body">
                        <div class="cmt-heading " style="display:inline-block;">   
                                <asp:Label ID="TieuDeCMT" runat="server" Text="Media heading"></asp:Label>
                        </div>
                        <div class="cmt-content" style="display:inline-block;">
                            <p>
                                <asp:Label ID="NoiDungCMT" runat="server" Text="Label"></asp:Label>
                            </p>
                        </div>

                    </div>
                </div>
            </div>--%>

        </div>

        <div class="col-md-4" style="padding-top: 30px;">
              <div class="panel panel-loiichky">
                <div class="panel-heading">
                    <h2 class="panel-title">Tin Hot</h2>
                </div>
                <div class="panel-body hotnews" style="padding: 0;">
                    <asp:Repeater ID="Repeater3" runat="server" DataSourceID="SqlDataSource1">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" CssClass="hotnews-link"  NavigateUrl='<%# Eval("Mabaiviet", "../ChiTietTinTuc.aspx?ma={0}") %>'
                                Text='<%# Eval("Tieude") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:Repeater>
             <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
                SelectCommand="SELECT * FROM [Baiviet] order by LuotXem desc"></asp:SqlDataSource>
                </div>
            </div>
        </div>
    </div>
</ItemTemplate>
</asp:Repeater>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:QLBSConnectionString %>"
        SelectCommand="SELECT * FROM [Baiviet] WHERE ([Mabaiviet] = @Mabaiviet)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Mabaiviet" QueryStringField="ma" Type="Int64" />
        </SelectParameters>
    </asp:SqlDataSource>

</asp:Content>

